/*
 * Net.cpp
 *
 *  Created on: 11-08-2011
 *      Author: tomasz
 */

#include "Net.h"

#include <GL/gl.h>
#include <GL/glu.h>


CNet::CNet(void)
{
}

CNet::~CNet(void)
{
}

void CNet::Draw(void)
{
	double x, y;

	glBegin(GL_LINES);
	glColor3f(0.5f, 0.5f, 0.5f);

	for (x = -5.0; x <= 5.0; x += 0.5)
	{
		glNormal3f(0.0f, 0.0f, 1.0f);
		glVertex3d(x, -5.0, 0.0);
		glVertex3d(x, 5.0, 0.0);

		glNormal3f(0.0f, 1.0f, 0.0f);
		glVertex3d(x, -5.0, 0.0);
		glVertex3d(x, 5.0, 0.0);
	}

	for (y = -5.0; y <= 5.0; y += 0.5)
	{
		glNormal3f(0.0f, 0.0f, 1.0f);
		glVertex3d(-5.0, y, 0.0);
		glVertex3d(5.0, y, 0.0);

		glNormal3f(0.0f, 1.0f, 0.0f);
		glVertex3d(-1.0, y, 0.0);
		glVertex3d(1.0, y, 0.0);

	}

	glEnd();
}
